<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@ page import="com.fengke.portal.config.HostConfig" %>
<%
	HostConfig hostConfig = (HostConfig) request.getSession().getServletContext().getAttribute("hostConfig");
%>
<!DOCTYPE html>
<head>
<base href="<%=hostConfig.getPortalHost() %>" />
<title><%=hostConfig.getWebSiteName() %></title>
<script type="text/javascript">
	base = "<%=hostConfig.getPortalHost() %>";
	res = "";
</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="format-detection" content="telephone=no">

<!-- pure bootstrap start 
	<link href="/static/jslib/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
	<link href="/static/jslib/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet" media="screen">
	<script src="/static/jslib/bootstrap/js/bootstrap.min.js"></script>
	 -->

<!-- jasny bootstrap start -->
<script src="resources/travel/weixin/js/jquery.min.js"></script>
<link href="resources/travel/weixin/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="resources/travel/weixin/css/animate.css" rel="stylesheet" media="screen">
<link href="resources/travel/weixin/css/bootstrap-theme.css" rel="stylesheet" media="screen">
<link href="resources/travel/weixin/css/travel.css" rel="stylesheet" media="screen">
<link href="resources/travel/weixin/css/messenger.css" rel="stylesheet" media="screen">
<link href="resources/travel/weixin/jslib/jquery-validation-engine/css/validationEngine.jquery.css" rel="stylesheet" media="screen">

<script src="resources/travel/weixin/js/bootstrap.min.js"></script>
<!-- jasny bootstrap end -->

<!-- bootstrap 3rd UI start -->
<link href="resources/travel/weixin/css/font-awesome.min.css" rel="stylesheet" media="screen">
<!--[if IE 7]>
	<link href="/static/jslib/font-awesome/css/font-awesome-ie7.min.css" rel="stylesheet" media="screen">
<![endif]-->

<script src="resources/travel/weixin/js/bootbox.js"></script>
<script src="resources/travel/weixin/js/messenger.js"></script>
<script src="resources/travel/weixin/js/messenger-theme-future.js"></script>
<script src="resources/travel/weixin/js/holder.js"></script>
<!-- bootstrap 3rd UI end -->
<!-- jquery plugin start -->
<link href="resources/travel/weixin/css/image.css" rel="stylesheet" media="screen">
<!-- jquery plugin end -->

<script src="resources/travel/weixin/js/application.js"></script>
<script src="resources/travel/weixin/js/ejs.js"></script>
<meta name="decorator" content="modMobile">
<script src="resources/travel/weixin/jslib/jquery-validation-engine/js/languages/jquery.validationEngine-zh_CN.js"></script>
<script src="resources/travel/weixin/jslib/jquery-validation-engine/js/jquery.validationEngine.js"></script>
<script src="resources/travel/weixin/js/TouchSwipe.js"></script>
<style type="text/css">
article,aside,details,figcaption,figure,footer,header,hgroup,nav,section
{
	display: block;
}

html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,form,fieldset,legend,input,lable,textarea,p,blockquote,th,td
{
	margin: 0;
	padding: 0;
}

html {
	font-size: 100%;
	overflow-y: scroll;
	-webkit-text-size-adjust: 100%;
	-ms-text-size-adjust: 100%;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

fieldset,img {
	border: 0;
}

address,caption,cite,code,dfn,em,th,var {
	font-style: normal;
	font-weight: normal;
}

ol,ul {
	list-style: none;
}

body {
	width: 100%;
}

.box_163css {
	overflow: hidden;
	width: 100%;
	font-weight: 300;
	position: relative;
}

.line {
	height: 100%;
	left: 0;
	text-align: center;
	cursor: pointer;
}

.line li {
	float: left;
	height: 100%;
}

.line li:first-child {
	background: none;
}

.line li a {
	color: #fff;
	text-decoration: none;
}

.line .panel-default>.panel-heading {
	background: #fff !important
}
</style>
</head>
<body onclick="clickBody(event)">
	<div class="container">
		<div class="row">
			<div class="col-xs-12 col-sm-12 padding_0 order header_title">
				<div class="media evaluation_content individual_center">
					<a class="media-left pull-left" href="travel/weixin/user/edit.action">
						<img class="img-rounded" data-holder-rendered="true"
						src="<s:if test='memberVO.memberModel.headImgUrl != null'><s:property value='memberVO.memberModel.headImgUrl' /></s:if><s:else>resources/travel/weixin/images/headportrait.jpg</s:else>"
						style="width: 60px; height: 60px;" data-src="" alt="60x60">
					</a>
					<div class="media-body evaluation_left displayinline">
						<h4 class="media-heading username color-write">
							<span class="phonenumber pull-right" style="color: #ffffff !important; font-size: 1.05em;"><s:property value='memberVO.memberModel.mobile' /></span>
							<span class="pull-left name" style="font-size: 1.05em;"><s:property value='memberVO.memberModel.username' /></span>
							<span class="pull-left gender_identity <s:if test='"male".equals(memberVO.memberModel.gender)'> boy_icon </s:if><s:else> girl_icon </s:else>"></span>
						</h4>
						<p class="center_aphorism" style="font-size: 1.05em;"><s:property value='memberVO.memberModel.memo' /></p>
					</div>
				</div>
			</div>
		</div><!-- row -->
		<div class="row">
			<div class="col-xs-12 col-sm-12 padding_0">
				<div class="tab-v1 travel_itinerary center_list">
					<ul
						class="nav nav-tabs margin-bottom-10 orderborder_bottom carousel">
						<li class="active"><a data-toggle="home">待支付</a><span
							class="grayline pull-right"></span></li>
						<li class=""><a data-toggle="profile">已支付</a><span
							class="grayline pull-right"></span></li>
						<li class=""><a data-toggle="messages">进行中</a><span
							class="grayline pull-right"></span></li>
						<li class=""><a data-toggle="settings">已完成</a><span
							class="grayline pull-right"></span></li>
						<li class=""><a data-toggle="closed">已关闭</a></li>
					</ul>
				</div>
			</div>
		</div><!-- row -->
	</div><!-- container -->
	<div class="box_163css">
		<div class="row">
			<div class="col-xs-12 col-sm-12">
				<ul class="line center_list" style="background: black;">
					<li>
						<div id="home" class=" fade active in" >
							<div id="accordion-1" class="panel-group acc-v1 margin-bottom-0">
								<s:if test='memberVO.unPaidOrderList != null && memberVO.unPaidOrderList.size() > 0'>
									<s:iterator value="memberVO.unPaidOrderList" var="order" status="countIdx">
									<div class="panel panel-default margin-bottom-10 animated fadeInDown" data-value="<s:property value='#order.orderModel.id' />">
										<div class="panel-heading padding_10">
											<div class="panel-title clearfix">
												<a href="#collapse-One" data-parent="#accordion-1" data-toggle="collapse" class="accordion-toggle clearfix ">
												<span class="pull-right itineraryfonts" style="color: #646464"><s:property value='#order.orderModel.goDate' />出发</span>
												<span class="pull-left itineraryfonts" style="color: #646464">订单：<s:property value='#order.orderModel.sn' /></span>
												</a>
											</div>
											<div class="individual_center synchysis_box clearfix">
												<a href="#" class="media-left pull-left">
												<img alt="60x60" data-src="" style="width: 90px; height: 70px;"
													src="<s:if test='#order.orderItemModelList[0].product.image != null'><s:property value='#order.orderItemModelList[0].product.image' /></s:if><s:else>resources/travel/weixin/images/individual_smallimg.jpg</s:else>" data-holder-rendered="true" class="img-rounded">
												</a>
												<div class="media-body evaluation_left displayinline">
													<h4 class="media-heading username color-write">
 														<dl class="clearfix individual_dl"><!--class="individualtitle" -->
															<dt style="display:block;width:100%;text-align:left;" ><s:property value='#order.orderModel.productName' /></dt>
															<dt style="display:block;width:100%;text-align:left;">成人 <s:property value='#order.orderModel.adultNum' />;儿童 <s:property value='#order.orderModel.childrenNum' /></dt>
														</dl>
													</h4>
												</div>
											</div>
											<div class="actual_paymentbox clearfix ">
												<span class="pull-left mt_5 ">应付款：<s:text name="format.number"><s:param value='#order.orderItemModelList[0].product.price' /></s:text></span>
												<span class="pull-right margin-bottom-10">
													<button class="btn to_pay pull-right" onclick="goToPay(<s:property value='#order.orderModel.id' />,this,event)" type="button">去支付</button>
													<button class="btn cancellation_pay to_pay pull-right" onclick="cancellOrder(<s:property value='#order.orderModel.id' />,this,event)"
														 type="button">取消订单</button>
												</span>
											</div>
										</div>
									</div>
									</s:iterator>
								</s:if>
								<s:else>
									<div class="panel-default margin-bottom-10  animated fadeInRightBig " data-value="">
										<div class="orderpretermit_pic ">
											<img src="resources/travel/weixin/images/orderpretermit1.png" class="img-responsive">
										</div>
										<p class="marked_words">您没有未支付的订单</p>
										<p>
											<button class="btn submit_stroll margin_right0 goIndex" type="button">去逛逛</button>
										</p>
									</div>
								</s:else>
							</div>
						</div>
					</li>
					<li>
						<div id="profile" class=" fade active in ">
							<div id="accordion-1" class="panel-group acc-v1 margin-bottom-0">
								<s:if test='memberVO.paidOrderList != null && memberVO.paidOrderList.size() > 0'>
									<s:iterator value="memberVO.paidOrderList" var="order" status="countIdx">
									<div class="panel panel-default margin-bottom-10 animated fadeInDown" data-value="<s:property value='#order.orderModel.id' />">
										<div class="panel-heading padding_10">
											<div class="panel-title clearfix">
												<a href="#collapse-One" data-parent="#accordion-1" data-toggle="collapse" class="accordion-toggle clearfix ">
												<span class="pull-right itineraryfonts" style="color: #646464"><s:property value='#order.orderModel.goDate' />出发</span>
												<span class="pull-left itineraryfonts" style="color: #646464">订单：<s:property value='#order.orderModel.sn' /></span>
												</a>
											</div>
											<div class="individual_center synchysis_box clearfix">
												<a href="#" class="media-left pull-left">
												<img alt="60x60" data-src="" style="width: 90px; height: 70px;"
													src="<s:if test='#order.orderItemModelList[0].product.image != null'><s:property value='#order.orderItemModelList[0].product.image' /></s:if><s:else>resources/travel/weixin/images/individual_smallimg.jpg</s:else>"
													data-holder-rendered="true" class="img-rounded">
												</a>
												<div class="media-body evaluation_left displayinline">
													<h4 class="media-heading username color-write">
														<dl class="clearfix individual_dl">
															<dt style="display:block;width:100%;text-align:left;"><s:property value='#order.orderModel.productName' /></dt>
															<dt style="display:block;width:100%;text-align:left;">成人 <s:property value='#order.orderModel.adultNum' />;儿童 <s:property value='#order.orderModel.childrenNum' /></dt>
														</dl>
													</h4>
												</div>
											</div>
											
											<div class="actual_paymentbox clearfix ">
												<span class="pull-left mt_5 ">实付款：<s:text name="format.number"><s:param value='#order.orderItemModelList[0].product.price' /></s:text></span>
												<span class="pull-right margin-bottom-10">
														<button class="btn to_pay pull-right " type="button" style="visibility: hidden;" >重新下单</button>
												</span>
											</div>
										</div>
									</div>
									</s:iterator>
								</s:if>
								<s:else>
									<div class="panel-default margin-bottom-10  animated  ">
										<div class="orderpretermit_pic ">
											<img src="resources/travel/weixin/images/orderpretermit2.png" class="img-responsive">
										</div>
										<p class="marked_words">您还没有已支付的订单</p>
										<p>
											<button class="btn submit_stroll margin_right0 goIndex" type="button">去逛逛</button>
										</p>
									</div>
								</s:else>
							</div>
						</div>
					</li>
					<li>
						<div id="messages" class=" fade active in">
							<div id="accordion-1" class="panel-group acc-v1 margin-bottom-0">
								<s:if test='memberVO.ongoingOrderList != null && memberVO.ongoingOrderList.size() > 0'>
									<s:iterator value="memberVO.ongoingOrderList" var="order" status="countIdx">
								<div class="panel panel-default margin-bottom-10 animated fadeInDown"
									data-value="<s:property value='#order.orderModel.id' />">
									<div class="panel-heading">
										<div class="panel-title clearfix">
											<a href="#collapse-One" data-parent="#accordion-1"
												data-toggle="collapse" class="accordion-toggle clearfix "><span
												class="pull-right itineraryfonts" style="color: #646464">旅途中</span><span
												class="pull-left itineraryfonts" style="color: #646464">订单：<s:property value='#order.orderModel.sn' /></span>
											</a>
										</div>
										<div class="individual_center synchysis_box clearfix">
											<a href="#" class="media-left pull-left"> <img
												alt="60x60" data-src="" style="width: 90px; height: 70px;"
												src="<s:if test='#order.orderItemModelList[0].product.image != null'><s:property value='#order.orderItemModelList[0].product.image' /></s:if><s:else>resources/travel/weixin/images/individual_smallimg.jpg</s:else>"
												data-holder-rendered="true" class="img-rounded">
											</a>
											<div class="media-body evaluation_left displayinline">
												<h4 class="media-heading username color-write">
													<dl class="clearfix individual_dl">
														<dt style="display:block;width:100%;text-align:left;"><s:property value='#order.orderModel.productName' /></dt>
														<dt style="display:block;width:100%;text-align:left;">成人 <s:property value='#order.orderModel.adultNum' />;儿童 <s:property value='#order.orderModel.childrenNum' /></dt>
													</dl>
												</h4>

											</div>
										</div>
										<div class="actual_paymentbox clearfix ">
											<span class="pull-left mt_5 ">实付款：<s:text name="format.number"><s:param value='#order.orderItemModelList[0].product.price' /></s:text></span>
											<span class="pull-right margin-bottom-10">
												<button class="btn to_pay pull-right" onclick="changeStatus(<s:property value='#order.orderModel.id' />,this,event)" type="button">确认</button>
											</span>
										</div>
									</div>
								</div>
								</s:iterator>
								</s:if>
								<s:else>
								<div class="panel-default margin-bottom-10  animated  ">
									<div class="orderpretermit_pic ">
										<img src="resources/travel/weixin/images/orderpretermit3.png" class="img-responsive">
									</div>
									<p class="marked_words">您还没有进行中的订单</p>
									<p>
										<button class="btn submit_stroll margin_right0 goIndex"
											type="button">去逛逛</button>
									</p>
								</div>
								</s:else>

								<!--进行中默认图片-->

							</div>
						</div>
					</li>
					<li>
						<div id="settings" class=" fade active in">
							<div id="accordion-1" class="panel-group acc-v1 margin-bottom-0">
								<!--已完成默认图片-->
								<s:if test='memberVO.completedOrderList != null && memberVO.completedOrderList.size() > 0'>
									<s:iterator value="memberVO.completedOrderList" var="order" status="countIdx">
								<div class="panel panel-default margin-bottom-10 animated fadeInDown" data-value="<s:property value='#order.orderModel.id' />">
									<div class="panel-heading padding_10">
										<div class="panel-title clearfix">
											<a href="#collapse-One" data-parent="#accordion-1"
												data-toggle="collapse" class="accordion-toggle clearfix "><span
												class="pull-right itineraryfonts" style="color: #646464">已完成</span><span
												class="pull-left itineraryfonts" style="color: #646464">订单：<s:property value='#order.orderModel.sn' /></span>
											</a>
										</div>
										<div class="individual_center synchysis_box clearfix">
											<a href="#" class="media-left pull-left"> <img
												alt="60x60" data-src="" style="width: 90px; height: 70px;"
												src="<s:if test='#order.orderItemModelList[0].product.image != null'><s:property value='#order.orderItemModelList[0].product.image' /></s:if><s:else>resources/travel/weixin/images/individual_smallimg.jpg</s:else>"
												data-holder-rendered="true" class="img-rounded">
											</a>
											<div class="media-body evaluation_left displayinline">
												<h4 class="media-heading username color-write">
													<dl class="clearfix individual_dl">
														<dt style="display:block;width:100%;text-align:left;"><s:property value='#order.orderModel.productName' /></dt>
														<dt style="display:block;width:100%;text-align:left;">成人 <s:property value='#order.orderModel.adultNum' />;儿童 <s:property value='#order.orderModel.childrenNum' /></dt>
													</dl>
												</h4>

											</div>
										</div>
										
										<div class="actual_paymentbox clearfix ">
											<span class="pull-left mt_5 ">实付款：<s:text name="format.number"><s:param value='#order.orderItemModelList[0].product.price' /></s:text></span>
											<span class="pull-right margin-bottom-10">
												<button class="btn to_pay pull-right" type="button"
													onclick="goEvaluation('<s:property value="#order.orderItemModelList[0].product.image"/>', event);" >评价</button>
											</span>
										</div>
										
									</div>
								</div>
								</s:iterator>
								</s:if>
								<s:else>
								<div class="panel-default margin-bottom-10   animated  ">
									<div class="orderpretermit_pic ">
										<img src="resources/travel/weixin/images/orderpretermit4.png" class="img-responsive">
									</div>
									<p class="marked_words">您还没有已完成的订单</p>
									<p>
										<button class="btn submit_stroll margin_right0 goIndex"
											type="button">去逛逛</button>
									</p>
								</div>
								</s:else>
							</div>
						</div>
					</li>
					<li>
						<div id="closed" class=" fade active in" style="height: auto;">
							<div id="accordion-1" class="panel-group acc-v1 margin-bottom-0">
								<!--已关闭默认图片-->
								<s:if test='memberVO.cancellOrderList != null && memberVO.cancellOrderList.size() > 0'>
									<s:iterator value="memberVO.cancellOrderList" var="order" status="countIdx">
								<div class="panel panel-default margin-bottom-10 animated fadeInDown" data-value="<s:property value='#order.orderModel.id' />">
									<div class="panel-heading padding_10">
										<div class="panel-title clearfix">
											<a href="#collapse-One" data-parent="#accordion-1" data-toggle="collapse" class="accordion-toggle clearfix ">
											<span class="pull-right itineraryfonts" style="color: #646464">已关闭</span>
											<span class="pull-left itineraryfonts" style="color: #646464">订单：<s:property value='#order.orderModel.sn' /></span>
											</a>
										</div>
										<div class="individual_center synchysis_box clearfix">
											<a href="#" class="media-left pull-left">
											<img alt="60x60" data-src="" style="width: 90px; height: 70px;" 
												src="<s:if test='#order.orderItemModelList[0].product.image != null'><s:property value='#order.orderItemModelList[0].product.image' /></s:if><s:else>resources/travel/weixin/images/individual_smallimg.jpg</s:else>"
												data-holder-rendered="true" class="img-rounded">
											</a>
											<div class="media-body evaluation_left displayinline">
												<h4 class="media-heading username color-write">
													<dl class="clearfix individual_dl">
														<dt style="display:block;width:100%;text-align:left;"><s:property value='#order.orderModel.productName' /></dt>
														<dt style="display:block;width:100%;text-align:left;">成人 <s:property value='#order.orderModel.adultNum' />;儿童 <s:property value='#order.orderModel.childrenNum' /></dt>
													</dl>
												</h4>
											</div>
										</div>
										<div class="actual_paymentbox clearfix">
											<span class="pull-left pt_5"></span><span
												class="pull-right width50 margin-bottom-10">
												<button class="btn to_pay pull-right " type="button"
													onclick="repeatOrder(<s:property value='#order.orderModel.id' />,<s:property value='#order.orderItemModelList[0].product.id' />,this,event)">重新下单</button>
												<button class="btn cancellation_pay to_pay pull-right" onclick="deleteOrder(<s:property value='#order.orderModel.id' />,this,event)"
														 type="button">删除订单</button>
											</span>
										</div>
									</div>
								</div>
								</s:iterator>
								</s:if>
								<s:else>
								<div class="panel-default margin-bottom-10 animated  ">
									<div class="orderpretermit_pic " style="margin-top: -20px">
										<img src="resources/travel/weixin/images/orderpretermit5.png" class="img-responsive">
									</div>

									<p class="marked_words">您还没有已关闭的订单</p>
									<p>
										<button class="btn submit_stroll margin_right0 goIndex" type="button">去逛逛</button>
									</p>
								</div>
								</s:else>
								<!--已关闭默认图片-->
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</div>
	<form id="change_order_status_form" action="travel/weixin/order/changeStatus.action" method="post">
		<input type="hidden" id="change_order_status_orderId" name="orderVO.orderModel.id" value="" />
		<input type="hidden" id="change_order_status_orderStatus" name="orderVO.orderModel.orderStatus" value="" />
	</form>
	<form id="delete_order_form" action="travel/weixin/order/deleteOrder.action" method="post">
		<input type="hidden" id="delete_order_orderId" name="orderVO.orderModel.id" value="" />
	</form>
	<script type="text/javascript">
	var y=0;
	$(function(){
		
		n=$('.line li').size();	
		var wh=100*n+"%";
		$('.line').width(wh);
		var lt=(100/n/1);
		var lt_li=lt+"%";
		$('.line li').width(lt_li);			
		var w=n;						
		$(".line").swipe( {					
			swipeLeft:function(event, direction, distance, duration, fingerCount) {
				if(distance>50){
					if(y==-lt*(w-1)){
					//alert('已经到最后页');
					//	$(this).css({'-webkit-transform':"translate(0%)",'-webkit-transition':'1000ms linear'} );	
					//	moveTabNav(0);
					}else{
						y=y-lt;	
						var t=y+"%";
						$(".line").children().each(function(i){
							if((-y)/20!=i){
								$(this).css("height",$(window).height()-$(".evaluation_content").height()-$(".tab-v1").height());
							}else{
								$(this).css("height","auto");
							}
						});
						$(this).css({'-webkit-transform':"translate("+t+")",'-webkit-transition':'200ms linear'} );	
						moveTabNav((-y)/20);
					}
				}
				
			},
			swipeRight:function(event, direction, distance, duration, fingerCount) {
				if(distance>130){
					if(y==0){
						//alert('已经到第一页')	
						//$(this).css({'-webkit-transform':"translate(-100%)",'-webkit-transition':'1000ms linear'} );	
						//moveTabNav(4);
					}else{
						y=y+lt;
						var t=y+"%";
						$(".line").children().each(function(i){
							if((-y)/20!=i){
								$(this).css("height",$(window).height()-$(".evaluation_content").height()-$(".tab-v1").height());
							}else{
								$(this).css("height","auto");
							}
						});
						$(this).css({'-webkit-transform':"translate("+t+")",'-webkit-transition':'200ms linear'} );	
						moveTabNav((-y)/20);
					}
				}
				
			}
		});
		
		$(".line").children().each(function(i){
			if(i!=0){
				$(this).css("height",$(window).height()-$(".evaluation_content").height()-$(".tab-v1").height());
			}else{
				$(this).css("height","auto");
			}
		});
		
	});	
	
	
	function cancellOrder(orderId,target,event){
		
		showDialog("您确定要取消该订单吗?",function(){
			$('#change_order_status_orderId').attr('value', orderId);
			$('#change_order_status_orderStatus').attr('value', 'cancelled');
			$('#change_order_status_form').submit();
			/**
			$.ajax({
				url: "${base}/travel/weixin/order/changeStatus.jhtml",
				type: "GET",
				data : {orderId:orderId,status:"cancle"},
				dataType: "json",
				cache: false,
				success: function(data) {
					$(target).closest(".fadeInDown").slideUp("normal",function(){
						$(target).closest(".fadeInDown").remove();
						
						var html = new EJS({url: '${base}/resources/travel/weixin/ejs/order.ejs?rn=119'}).render({order:data,status:"cancle",context:"${base}"});
						if($("#closed #accordion-1").find(".goIndex").length!=0){
							$("#closed #accordion-1").empty();
						}
						$("#closed #accordion-1").append($(html));
						if($("#home #accordion-1").children().length ==0){
							var html2 = new EJS({url: '${base}/resources/travel/weixin/ejs/noOrder.ejs?rn=111'}).render({context:"${base}"});
							$("#home #accordion-1").append($(html2));
						}
					});
				}
			});*/
			
		}); 
		event.stopPropagation();
	}
	
	function deleteOrder(orderId,target,event){
		showDialog("您确定要删除该订单吗?",function(){
			$('#delete_order_orderId').attr('value', orderId);
			$('#delete_order_form').submit();
		});
		event.stopPropagation();
	}
	
	
	function goToPay(orderId,target,event){
		window.location.href = 'travel/weixin/order/payOrderAmount.action?orderVO.orderModel.id=' + orderId + "&isMyCenter=" + true;
		event.stopPropagation();
	}
	function repeatOrder(orderId,productId,target,event){
		window.location.href = 'travel/weixin/order/preCreateOrder.action?productVO.productModel.id=' + productId;
		event.stopPropagation();
	}
	
	
	function moveTabNav(index){
		$(".nav-tabs").children().eq(index).addClass("active").siblings().removeClass("active");
	}
	
	
	$(function(){
		
		app.validateEngine('form:first');
		$(".goIndex").click(function(){
			window.location.href = "travel/weixin/index.html";
		});
		
		
		$(".fadeInDown").click(function(){
			window.location.href = "travel/weixin/order/userOrderDetail.action?orderVO.orderModel.id="+$(this).attr("data-value");
		});
		
		$(".nav-tabs li").click(function(){
			var index = $(this).index();
			$(".line").css({'-webkit-transform':"translate("+(-index*20)+"%)",'-webkit-transition':'200ms linear'} );	
			moveTabNav(index);
			y = -index*20;
			
			$(".line").children().each(function(i){
				if(index!=i){
					$(this).css("height",$(window).height()-$(".evaluation_content").height()-$(".tab-v1").height());
					//$(this).fadeOut();
				}else{
					$(this).css("height","auto");
					//$(this).fadeIn();
				}
			});
		});
		
		$(".mobileCancle").click(function(){
			$(".mobileModel").hide();
		});
		
		$(".closeEv").click(function(){
			$(".fixed-back").hide();
			$("#evaluationDiv").hide();
		});
		$(".scoreSpan").find("span").click(function(){
			var index = $(this).index();
			$(".scoreSpan").find("span").each(function(i){
				if(i<index){
					$(this).removeClass("fa-star");
					$(this).addClass("fa-star-o");
				}else{
					$(this).removeClass("fa-star-o");
					$(this).addClass("fa-star");
				}
				$("input[name=score]").val(20*(5-index));
			});
		});
	});
	
	//进行中订单改为已完成
	function changeStatus(id,target,event){
		
		showDialog("是否已经完成了旅行？确认将支付尾款给商户?",function(){
			$('#change_order_status_orderId').attr('value', orderId);
			$('#change_order_status_orderStatus').attr('value', 'completed');
			$('#change_order_status_form').submit();
		});
		
		event.stopPropagation();
	}
	
	function showDialog(content,callback){
		$(".modal_news").find(".content").text(content);
		$(".mobileModel").show();
		$(".modal_news").find(".sure").click(function(){$(".mobileModel").hide();callback()});
	}
	
	

	function goEvaluation(_productId,event){
		$(".fixed-back").show();
		$("#evaluationDiv").show();
		 $(".evaluationForm").find("input[name=\"productId\"]").val(_productId);
		event.stopPropagation();
	}
	
	
	function clickBody(e){
	}
</script>
	<!--电话资询弹出框-->
	<div class=" modal-sm modal_news animated fadeInLeftBig mobileModel"
		style="display: none">
		<div class="modal-content">
			<div class="modal-header">
				<h4 id="mySmallModalLabel" class="modal-title">提示</h4>
				<p class="content">您确定要取消该订单吗？</p>
			</div>
			<div class="modal-body clearfix modal_btngroup">
				<button class="sure" data-dismiss="modal" type="button">确定</button>
				<button class="close pull-left mobileCancle" data-dismiss="modal"
					type="button">取消</button>
			</div>
		</div>
		<!-- /.modal-content -->
	</div>
	<!-- /.modal-dialog -->
	<!--电话资询弹出框-->
	
</body>
</html>